<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex benben-position-layout flex flex-wrap align-center pointsDetails_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex flex-wrap align-center justify-between flex-sub pointsDetails_fd0_0'>
					<view class='flex flex-wrap align-center pointsDetails_fd0_0_c0' @tap.stop="handleJumpDiy"
						data-type="back" data-url="1">
						<text class='fu-iconfont2  pointsDetails_fd0_0_c0_c0'>&#xe794;</text>
					</view>
					<text class='pointsDetails_fd0_0_c1'>积分明细</text>
					<view class='flex flex-wrap align-center pointsDetails_fd0_0_c0'>
					</view>
				</view>

			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---flex布局flex布局开始-->
			<view class="flex benben-flex-layout flex-wrap align-center pointsDetails_flex_1">
				<view>
					<benben-flex-tabs class-name='pointsDetails_benbenTabsfd1_0' v-model="tabs" ref="benben_tabsfd1_0"
						select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0" :open-title-type='false'
						:open-sticky='true' :top='88' :is-show-content='false' :scrollspy='false'
						:tabs-info.sync="tabsInfofd1_0" @change="getIntegralFunc()">

						<scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
							class="benben-tabs" style="width:750rpx" :scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
							<view class="benben-tabs-content" id="benben_tabsfd1_0-content">
								<view id="benben_tabsfd1_0-title"
									class="benben-tabs-title flex align-center justify-around flex ">
									<view
										:class="{ 'checkTitlefd1_0': tabs == '1', 'flex flex-wrap align-center': true }"
										@tap="tabs = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

										<text>全部</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '2', 'flex flex-wrap align-center': true }"
										@tap="tabs = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

										<text>收入记录</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': tabs == '3', 'flex flex-wrap align-center': true }"
										@tap="tabs = '3'" :id="`benben_tabsfd1_0-title-item-${'3'}`">

										<text>支出记录</text>

									</view>
								</view>
								<view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line pointsDetails_linefd1_0"></view>
							</view>
						</scroll-view>

					</benben-flex-tabs>

				</view>
			</view>

			<!---flex布局flex布局结束-->
			<!---flex布局flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout pointsDetails_flex_2">
				<template v-for='(item,key0) in integralList'>
					<view class='flex flex-direction flex-wrap align-stretch pointsDetails_fd2_0' :key='key0'>
						<view class='flex flex-wrap align-center pointsDetails_fd2_0_c0'>
							<text class='pointsDetails_fd2_0_c0_c0'>积分：</text>
							<text class='pointsDetails_fd2_0_c0_c1'
								v-if=" item.biandongleixing=='1'">{{item.change_score}}</text><text
								class='pointsDetails_fd2_0_c0_c1_1'
								v-if=" item.biandongleixing=='2'">{{item.change_score}}</text>
							<text class='pointsDetails_fd2_0_c0_c2'>{{item.create_time}}</text>
						</view>
						<text class='pointsDetails_fd2_0_c1'>{{item.change_type_name}}</text>
					</view>
				</template>
				<fu-empty :pagingListLoadedAll="pagingListLoadedAll" :pagingListNoListData="pagingListNoListData"
					:listDataLength="listDataLength" :isLoadInit="isLoadInit"></fu-empty>
			</view>

			<!---flex布局flex布局结束-->


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"tabs": "1",
				"integralList": []
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getIntegralFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {
			this.getIntegralFunc()
		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//获取积分明细
			getIntegralFunc() {
				this.minixPagingListsApi = global.apiUrls.post63c60ec237c3f;
				this.pageingListApiMethod = 'get';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					biandongleixing: this.tabs
				}
				this.listData = [];
				this.integralList = this.listData;
				this.pagingListToggle();

			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: var(--benbenbgColor1);
		background-size: 100% auto;
	}

	.pointsDetails_flex_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.pointsDetails_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.pointsDetails_fd0_0_c0_c0 {
		font-size: 32rpx;
		color: #333;
	}

	.pointsDetails_fd0_0_c0 {
		width: 120rpx;
		height: 88rpx;
	}

	.pointsDetails_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.pointsDetails_flex_1 {
		border-bottom: 1px solid #eee;
	}

	.pointsDetails_linefd1_0 {
		background: var(--benbenbgColor2);
		width: 50rpx;
		height: 8rpx;
		top: 85rpx;
		background-size: 100% auto !important;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}

	.checkTitlefd1_0 {
		font-weight: 700 !important;
		font-size: 32rpx !important;
		color: #E31D1A !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .pointsDetails_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 94rpx;
		white-space: nowrap;
		text-align: center;
		font-size: 32rpx;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.pointsDetails_flex_2 {
		background: #fff;
		padding: 0rpx 32rpx 0rpx 32rpx;
		background-size: 100% auto !important;
		margin: 20rpx 0rpx 0rpx 0rpx;
	}

	.pointsDetails_fd2_0_c1 {
		color: #BFBFBF;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 34rpx;
	}

	.pointsDetails_fd2_0_c0_c2 {
		color: #BFBFBF;
		font-size: 24rpx;
		font-weight: 400;
		line-height: 34rpx;
		margin: 0rpx 0rpx 0rpx auto;
	}

	.pointsDetails_fd2_0_c0_c1_1 {
		color: rgba(51, 51, 51, 1);
		font-size: 32rpx;
		font-weight: 500;
		line-height: 40rpx;
	}

	.pointsDetails_fd2_0_c0_c1 {
		color: #E60036;
		font-size: 32rpx;
		font-weight: 500;
		line-height: 40rpx;
	}

	.pointsDetails_fd2_0_c0_c0 {
		color: #333333;
		font-size: 28rpx;
		font-weight: 400;
		line-height: 40rpx;
	}

	.pointsDetails_fd2_0_c0 {
		margin: 0rpx 0rpx 16rpx 0rpx;
	}

	.pointsDetails_fd2_0 {
		border-bottom: 1px solid #eee;
		padding: 32rpx 0rpx 24rpx 0rpx;
	}
</style>